package classfile

/*
    字符串字面量，String并不存放数据，值存放常量池索引
 */

/*
CONSTANT_String_info {
    u1 tag;
    u2 string_index;
}
*/
type ConstantStringInfo struct {
    cp          ConstantPool
    stringIndex uint16
}

func (self *ConstantStringInfo) readInfo(reader *ClassReader) {
    self.stringIndex = reader.readUint16()
}
func (self *ConstantStringInfo) String() string {
    return self.cp.getUtf8(self.stringIndex)
}
